﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AppEnvironment.Lib;

namespace AppEnvironment.Web
{
    [Statefull(StateTypeEnum.Thread)]
    public class WebEvents
    {
        public event Action OnEndRequest;
        public void RequestEnded()
        {
            if (OnEndRequest != null)
            {
                OnEndRequest();
            }
        }

        public event Action<Exception> OnError;
        public void ErrorOccurred(Exception e)
        {
            if (OnError != null)
            {
                OnError(e);
            }
        }
    }
}
